package main

import (
	"github.com/gorilla/mux" //路由库
	"log"
	"net/http"
)

func main() {

	http.Handle("/view/", http.FileServer(http.Dir("frontWeb")))

	mux_router := mux.NewRouter() //用mux库做路由
	http.Handle("/", mux_router)  //这一句别忘了 否则前面的mux_router是不作用的
	log.Println("正在监听5555端口,main.go")
	//http.HandleFunc("/", NotFoundHandler) //当没有找到路径名字时，后面改为用mux库了
	err1 := http.ListenAndServe(":5555", nil)
	if err1 != nil {
		log.Fatal("ListenAndServe:", err1)
	}
}
